home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
wildcat
/
qwkhold1.zip
/
QWK2MAKE.WCX
(
.txt
)
< prev
next >
Wrap
Wildcat! WCX
|
1996-05-17
|
10KB
|
550 lines
'! Decompiled with wccNosy version 4.20f (freeware)
'! Input File: in.wcx 10068 bytes 03/09/122 08:19:16am
'! Code Segment Size :7299 bytes
'! Data Segment Size :5823 bytes
'! String Segment Size:2769 bytes
'! Compiled with WCC version 4.12
Type Type26
Filler0(1 To 6) As Byte
s6 As String*70
Filler76(1 To 14) As Byte
s90 As String*70
Filler160(1 To 14) As Byte
s174 As String*70
Filler244(1 To 20) As Byte
w264 As Word
End Type
Dim i4463 As Integer
Dim s4465 As String
Dim s4469 As String
Dim d4473 As Date
Dim i4475 As Integer
Dim s4477 As String
Dim s4481 As String
Dim s4485 As String
Dim w4489 As Word
Dim s4491 As String
Dim sr4495 As SearchRec
Dim l4544 As Long
Dim i4548 As Integer
Dim i4552 As Integer
Dim s4554 As String
Dim s4558 As String
Dim s4562 As String
Dim s4566 As String
Dim s4570 As String
Dim i4574 As Integer
Dim i4576 As Integer
Dim l4578 As Long
Dim mh4582 As MessageHeader
Dim i4902 As Integer
Dim s4904 As String
Dim nir4908 As NodeInfoRecord
Dim i5094 As Integer
Dim i5096 As Integer
Dim i5098 As Integer
Dim s5100 As String
Dim o5104 As Boolean
Dim s5105 As String
Dim s5109 As String
Dim s5113 As String
Dim s5117 As String
Dim s5123 As String
Dim s5127 As String
Dim s5135 As String
Dim i5139 As Integer
Dim s5147 As String
Dim s5151 As String
Dim l5155 As Long
Dim ur5163 As UserRecord
Dim s5813 As String
Dim i5817 As Integer
Dim l65530_ As Long
Dim i65534_ As Integer
EnablePages 0
EnablePages 0
s4491 = ProgPath + "QWK2HOLD.CFG"
If Exists(s4491) Then
Open s4491 For Input As 1
If Not Local Then
CarrierCheck(0)
End If
110 LockFile(1, 0, 1)
Input #1, s5813
Input #1, i5817
Input #1, s5135
Input #1, s5123
Input #1, s5147
Input #1, s5151
Input #1, i4576
Input #1, i4574
Input #1, l4578
Input #1, i4902
Input #1, s5105
Input #1, s5109
Input #1, s5113
Input #1, s5117
Input #1, s5127
Input #1, s4554
Input #1, s4558
Input #1, s4562
Input #1, s4566
Input #1, s4570
UnlockFile(1, 0, 1)
Close 1
If Not Local Then
CarrierCheck(-1)
End If
296 Else
302 i4463 = 0
GoTo 6322
End If
314 If s5813 = "" Then
i4463 = 1
GoTo 6322
Else
350 s5813 = Trim(UCase(s5813))
If Mid(s5813, 2, 2) <> ":\" Then
i4463 = 1
GoTo 6322
End If
401 If Right(s5813, 1) <> "\" Then
s5813 = s5813 + "\"
End If
End If
438 If s5135 = "" Then
i4463 = 2
GoTo 6322
Else
474 s5135 = Trim(UCase(s5135))
If Mid(s5135, 2, 2) <> ":\" Then
i4463 = 2
GoTo 6322
End If
525 If Right(s5135, 1) <> "\" Then
s5135 = s5135 + "\"
End If
End If
562 If s5123 = "" Then
i4463 = 3
GoTo 6322
Else
598 s5123 = UCase(s5123)
End If
609 If s5147 = "" Then
s5147 = "NO SEC1"
Else
641 s5147 = Trim(UCase(s5147))
End If
655 If s5151 = "" Then
s5151 = "NO SEC2"
Else
687 s5151 = Trim(UCase(s5151))
End If
701 If s5127 = "" Then
i4463 = 15
GoTo 6322
Else
737 s5127 = Trim(UCase(s5127))
If Mid(s5127, 2, 2) <> ":\" Then
i4463 = 15
GoTo 6322
End If
788 If Right(s5127, 1) <> "\" Then
s5127 = s5127 + "\"
End If
End If
825 If i4576 <= 0 Then
i4576 = 1
End If
846 If i4576 >= 26 Then
i4576 = 26
End If
868 If i4574 <= 0 Then
i4574 = 0
End If
888 If i4574 >= 365 Then
i4574 = 365
End If
912 If l4578 <= 0 Then
l4578 = 2147483647
End If
936 If l4578 >= 2147483647 Then
l4578 = 2147483647
End If
964 If s5105 = "" Or Len(s5105) <> 2 Then
s5105 = "@0E@"
Else
1009 s5105 = "@" + UCase(s5105) + "@"
End If
1034 If s5109 = "" Or Len(s5109) <> 2 Then
s5109 = "@0F@"
Else
1079 s5109 = "@" + UCase(s5109) + "@"
End If
1104 If s5113 = "" Or Len(s5113) <> 2 Then
s5113 = "@0B@"
Else
1149 s5113 = "@" + UCase(s5113) + "@"
End If
1174 If s5117 = "" Or Len(s5117) <> 2 Then
s5117 = "@0C@"
Else
1219 s5117 = "@" + UCase(s5117) + "@"
End If
1244 CurrentDate d4473
s4465 = FormatDate(d4473, "ddmmyyyy")
s4477 = Left(s4465, 2)
s4481 = Mid(s4465, 3, 2)
s4485 = Mid(s4465, 5, 4)
i4475 = (Val(s4485) - 1980) * 512 + Val(s4481) * 32 + Val(s4477)
If s5813 = s5135 Then
i4463 = 3
s4469 = "QWK2: Line #1 and Line #3 of QWK2HOLD.CFG MUST NOT be the same."
Print s4469
ActivityLog s4469
Else
1405 i5094 = 0
i4548 = 0
1417 Do While i4548 < i4576
s4904 = s5135 + Str(User.UserId) + ".QW" + Chr(i5094 + 65)
s5100 = s5135 + Str(User.UserId) + ".QW" + Chr(i4548 + 65)
If Exists(s5100) Then
i4548 = i4548 + 1
i5094 = i5094 + 1
If s5100 <> s4904 Then
Name s5100 As s4904
End If
1589 Else
1595 i4548 = i4548 + 1
End If
1609 Loop
1615 i5139 = i5094
MorePrompt(0)
s4469 = "QWK2: Packet Storage program has started"
ActivityLog s4469
s4491 = ProgPath + "QWK2WAIT.BAT"
If Exists(s4491) Then
Del s4491
End If
1680 GetFirstUser(ur5163, 5)
i4552 = Val(Mid(s5123, 9, 1))
If UCase(Trim(Left(ur5163.Comment(i4552), 8))) = "QWK2 ON" Then
o5104 = 0
Print s5117; "QWK2 ON"; s5105; " ---> ["; s5109; ur5163.UserId; s5105; "] ["; s5113; ur5163.Name; s5105; "]."
Delay 4
l5155 = 0
GoSub 2472
Else
1893 Print s5105; "QWK2 OFF --> ["; s5109; ur5163.UserId; s5105; "] ["; s5113; ur5163.Name; s5105; "]."
End If
1969 Print "Finished checking first user record."
1978 Do While GetNextUser(ur5163, 5)
o5104 = 0
i4552 = Val(Mid(s5123, 9, 1))
If UCase(Trim(Left(ur5163.Comment(i4552), 8))) = "QWK2 ON" Then
Print s5117; "QWK2 ON"; s5105; " ---> ["; s5109; ur5163.UserId; s5105; "] ["; s5113; ur5163.Name; s5105; "]."
Delay 4
GoSub 2472
Else
2190 Print s5105; "QWK2 OFF --> ["; s5109; ur5163.UserId; s5105; "] ["; s5113; ur5163.Name; s5105; "]."
End If
2266 Loop
2272 GoSub 5631
If Exists(s5127 + "QWK2MA1.FLG") Then
Del s5127 + "QWK2MA1.FLG"
End If
2312 If Exists(s5127 + "QWK2MA2.FLG") Then
Del s5127 + "QWK2MA2.FLG"
End If
2346 If Exists(s5127 + "QWK2MA3.FLG") Then
Del s5127 + "QWK2MA3.FLG"
End If
2380 If Exists(s5127 + "QWK2MA4.FLG") Then
Del s5127 + "QWK2MA4.FLG"
End If
2414 If Exists(s5127 + "QWK2MA5.FLG") Then
Del s5127 + "QWK2MA5.FLG"
End If
2448 s4469 = "QWK2: Packet Storage program has ended."
ActivityLog s4469
MorePrompt(-1)
End
2472 Print s5105; "QWK2: "; s5113; ur5163.Name; s5105; " Verifying user account is not open."
Delay 2
s4491 = ProgPath + "QWK2WAIT.BAT"
i5094 = 0
i4463 = 0
l5155 = 0
2558 Do While i5094 <= MaxNode
GetNodeInfo nir4908, i5094
If nir4908.NodeStatus = 3 Then
If Trim(nir4908.CallersName) = UCase(Trim(ur5163.Name)) Then
o5104 = -1
Open s4491 For Append As 2
LockFile(2, 0, 1)
s4465 = "WCMAIL " + UCase(Trim(ur5163.Name)) + " /PRESCAN"
Print #2, s4465
UnlockFile(2, 0, 1)
Close 2
s4469 = "QWK2: " + ur5163.Name + "'s account was found open on node " + Str(i5094) + "."
ActivityLog s4469
Print s5105; "QWK2: "; s5113; ur5163.Name; "'s"; s5105; " account found "; s5117; "active"; s5105; " on Node #"; s5113; i5094; s5105; "!"
Delay 2
i5094 = MaxNode + 1
End If
End If
2911 i5094 = i5094 + 1
Loop
2931 i5094 = 0
s4469 = ""
s4491 = ""
Print s5105; "QWK2: "; s5113; ur5163.Name; s5105; " Finished verifying account status."
Delay 2
If o5104 = -1 Then
Return
End If
3026 i5094 = 0
i4548 = 0
Print s5105; "QWK2: "; s5113; ur5163.Name; s5105; " Checking for existing and New packets."
3084 Do While i4548 < i4576
s4904 = s5135 + Str(ur5163.UserId) + ".QW" + Chr(i5094 + 65)
s5100 = s5135 + Str(ur5163.UserId) + ".QW" + Chr(i4548 + 65)
If Exists(s5100) Then
i4548 = i4548 + 1
i5094 = i5094 + 1
If s5100 <> s4904 Then
Name s5100 As s4904
End If
3256 Else
3262 i4548 = i4548 + 1
End If
3276 Loop
3282 Cls
Locate 8, 1
Print s5105; "QWK2: "; s5113; ur5163.Name; s5105; " Checking storage depot."
i4548 = 0
i5139 = 0
i5098 = 0
l5155 = 0
3362 Do While i4548 < i4576
s4904 = s5135 + Str(ur5163.UserId) + ".QW" + Chr(i5139 + 65)
If Exists(s4904) Then
i5139 = i5139 + 1
FindFirst(s4904, 0, sr4495)
l4544 = sr4495.Size
w4489 = sr4495.DOSDate
l5155 = l5155 + sr4495.Size
MorePrompt(0)
Locate 10, 1
ClrEOL
Print s5105; "QWK2: "; s5113; ur5163.Name; s5105; " Last stored packet found was "; s5109; sr4495.Name; s5105; "."
Print
Print s5105; "Total Packets Found ......... ";
If i5139 > i4576 Then
Print s5117; i5139
Else
3659 Print s5109; i5139
End If
3674 Print s5105; "Maximum # Packets Allowed ... "; s5109; i4576
ClrEOL
Print s5105; "Last Checked Packet Size .... "; s5109; l4544; s5105; " Bytes"
Print s5105; "Total Packet Storage ........ ";
If l5155 > l4578 Then
Print s5117; l5155; s5105; " Bytes"
Else
3813 Print s5109; l5155; s5105; " Bytes"
End If
3841 Print s5105; "Packet Storage Maximum ...... "; s5109; l4578; s5105; " Bytes"
ClrEOL
Print s5105; "Packet Age Maximum .......... "; s5109; i4574; s5105; " Day(s)"
If i4475 - w4489 > i5098 Then
i5098 = i4475 - w4489
End If
3968 Print s5105; "Oldest Packet Age was ....... ";
If i5098 > i4574 Then
Print s5117; i5098; s5105; " Day(s)"
Else
4035 Print s5109; i5098; s5105; " Days(s)"
End If
4063 ClrEOL
End If
4066 i4548 = i4548 + 1
Loop
4086 Delay 3
Print
If i5139 < i4576 And l5155 < l4578 Then
s4465 = s5135 + Str(ur5163.UserId) + ".QW"
s4904 = s4465 + Chr(i5139 + 65)
s5100 = s5813 + Str(ur5163.UserId) + ".QWK"
If Exists(s5100) Then
CopyFile(s5100, s4904)
s4465 = Str(ur5163.UserId) + ".QWK"
DeleteFile(s4465, i5817, 1)
i5139 = i5139 + 1
FindFirst(s4904, 0, sr4495)
l4544 = sr4495.Size
l5155 = l5155 + sr4495.Size
End If
End If
4332 Do While i5139 < i4576 And l5155 < l4578 And i5098 < i4574
Cls
s4465 = "WCMAIL " + Trim(ur5163.Name) + " /PRESCAN"
Shell s4465, ""
If Exists(s5100) Then
s4465 = s5135 + Str(ur5163.UserId) + ".QW"
s4904 = s4465 + Chr(i5139 + 65)
s5100 = s5813 + Str(ur5163.UserId) + ".QWK"
CopyFile(s5100, s4904)
s4465 = Str(ur5163.UserId) + ".QWK"
DeleteFile(s4465, i5817, 1)
FindFirst(s4904, 0, sr4495)
s4465 = "QWK2: " + ur5163.Name + " had the new packet moved to"
s4465 = s4465 + " storage location " + sr4495.Name + "."
ActivityLog s4465
l4544 = sr4495.Size
l5155 = l5155 + sr4495.Size
i5139 = i5139 + 1
Else
4703 GoTo 4716
Return
End If
4710 Loop
4716 Print s5105; "QWK2: "; s5113; ur5163.Name; s5105; " Finished checking and or making packets."
Delay 3
If o5104 = -1 Then
Return
End If
4787 Print s5105; "QWK2: "; s5113; ur5163.Name; s5105; " Checking for any exceeded limits."
Delay 2
i5096 = Val(Mid(s5123, 9, 1))
s4465 = Pad(UCase(Left(ur5163.Comment(i5096), 9)), 9)
ur5163.Comment(Val(Mid(s5123, 9, 1))) = s4465
If i5139 >= i4576 Then
s4465 = "QWK2: " + ur5163.Name + " has reached the QWK2 MaxPacket limit of "
s4465 = s4465 + Str(i4576) + "."
ActivityLog s4465
End If
5048 If l5155 >= l4578 Then
s4465 = "QWK2: " + ur5163.Name + " has exceeded the QWK2 MaxSize limit of "
s4465 = s4465 + Str(l4578) + "."
ActivityLog s4465
End If
5126 If i5098 >= i4574 Then
s4465 = "QWK2: " + ur5163.Name + " has QWK2 packet(s) that reached the "
s4465 = s4465 + "old age of " + Str(i4574) + " days."
ActivityLog s4465
s4465 = "QWK2: " + ur5163.Name + " had the Automated QWK option turned off."
ActivityLog s4465
ur5163.Comment(Val(Mid(s5123, 9, 1))) = "QWK2 OFF "
s4469 = Chr(13) + Chr(13)
s4465 = "This is an automated message." + s4469
s4465 = s4465 + "The automatic mail packets you requested are not" + " being picked up." + s4469
s4465 = s4465 + "This option has been turned off and packets found" + " after 15 days will be deleted."
If Exists(ProgPath + "QWK2WARN.TXT") Then
s4465 = ProgPath + "QWK2WARN.TXT"
End If
5414 mh4582.To = ur5163.Name
mh4582.From = MakeWild.SysopName
FlagSet mh4582.Flags, 1
FlagSet mh4582.Flags, 2
mh4582.Subject = "QWK Age Limit"
AddMessage(mh4582, s4465, "", i4902)
s4469 = s5105 + "QWK2: " + s5113 + ur5163.Name + s5105 + " was sent a message advising of old mail."
ActivityLog s4469
End If
5569 UpdateUser(ur5163)
Print s5105; "QWK2: "; s5113; ur5163.Name; s5105; " Finished checking limits."
Delay 3
Return
5631 Print s5105; "QWK2: Checking for any expired packets."
Delay 3
s4465 = s5135 + "*.QW?"
i5096 = FindFirst(s4465, 0, sr4495)
Cls
MorePrompt(0)
Locate 8, 1
Print s5105; "Deleting any QWK2 Packets over "; s5109; i4574 + 15; s5105; " days old."
Locate 10, 1
Print s5105; " FileName AGE Size"
5767 Do While i5096 = 0
Locate 12, 1
ClrEOL
Print s5105; LeftPad(sr4495.Name, 12);
If i4475 - sr4495.DOSDate > i4574 Then
Print s5117;
Else
5859 Print s5109;
End If
5867 Print LeftPad(Str(i4475 - sr4495.DOSDate), 7);
Print s5113; LeftPad(Str(sr4495.Size), 14)
If i4475 - sr4495.DOSDate > i4574 Then
Delay 4
Else
5965 Delay 0.2
End If
5973 If i4475 - sr4495.DOSDate > i4574 + 15 Then
s4904 = LeftPad(sr4495.Name, 12)
6046 For i5094 = 1 To 26 Step 1
s4469 = Trim(Left(s4904, 8)) + ".QW" + Chr(64 + i5094)
s5100 = s5135 + s4469
If Exists(s5100) Then
Locate 6, 1
Print s5105; "Last expired QWK Packet."
ClrEOL
Print s5109; s4469; s5117; " has expired and was removed."
Delay 3
Del s5100
s4465 = "QWK2: Deleted expired packet " + s4469 + "."
ActivityLog s4465
End If
6256 Next
End If
6279 i5096 = FindNext(sr4495)
Loop
6296 Print
Print s5105; "Finished checking for Expired packets."
Delay 3
Return
End If
6322 Cls
Print
If i4463 = 0 Then
Print s5117; "Your QWK2HOLD.CFG file was not located."
End If
6356 If i4463 >= 1 And i4463 <= 10 Then
Print s5105; "Line #"; s5109; i4463; s5105; " of the QWK2HOLD.CFG has a problem."
End If
6423 Print
Print s5105; "The current values of your "; s5109; "QWK2HOLD.CFG"; s5105; " file are"; s5109; ":"
Print s5105; "Line #1 = ["; s5109; s5813; s5105; "]"
Print s5105; "Line #2 = ["; s5109; i5817; s5105; "]"
Print s5105; "Line #3 = ["; s5109; s5135; s5105; "]"
Print s5105; "Line #4 = ["; s5109; s5123; s5105; "]"
Print s5105; "Line #5 = ["; s5109; s5147; s5105; "]"
Print s5105; "Line #6 = ["; s5109; s5151; s5105; "]"
Print s5105; "Line #7 = ["; s5109; i4576; s5105; "]"
Print s5105; "Line #8 = ["; s5109; i4574; s5105; "]"
Print s5105; "Line #9 = ["; s5109; l4578; s5105; "]"
Print s5105; "Line #10 = ["; s5109; i4902; s5105; "]"
Print s5105; "Line #11 = ["; s5109; Mid(s5105, 2, 2); s5105; "]"
Print s5105; "Line #12 = ["; s5109; Mid(s5109, 2, 2); s5105; "]"
Print s5105; "Line #13 = ["; s5109; Mid(s5113, 2, 2); s5105; "]"
Print s5105; "Line #14 = ["; s5109; Mid(s5117, 2, 2); s5105; "]"
Print s5105; "Line #15 = ["; s5109; s5127; s5105; "]"
Print
WaitEnter
s4469 = "QWK2 Ended with on an error of some kind"
Print
Print s4469
ActivityLog s4469
s4469 = "Check line #" + Str(i4463) + " of the QWK2HOLD.CFG."
Print
Print s4469
ActivityLog s4469
End